<?php
class PEAR2_Pyrus_Developer_PackageFile_PEAR2SVN_Filter extends FilterIterator
{
    protected $path;
    function __construct($path, $it)
    {
        $this->path = $path;
        parent::__construct($it);
    }

    public function accept()
    {
	if ($this->getInnerIterator()->isDot()) {
		return false;
	}
        $path = str_replace($this->path, '', $this->getInnerIterator()->current()->getPathName());
        if ($path && $path[0] === DIRECTORY_SEPARATOR) {
            $path = substr($path, 1);
        }
        $path = str_replace('\\', '/', $path);
        return !preg_match('@/?\.svn/@', $path);
    }
}
